package com.situ.mydatabase;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.widget.Toast;


public class MyDatabaseHelper extends SQLiteOpenHelper{
    public static final String CREATE_WORDS = "create table Words ("+"id integer primary key autoincrement, contain text)";
    private Context mcontext;

    public MyDatabaseHelper(Context context, String contain, SQLiteDatabase.CursorFactory factory, int version){
        super(context, contain, factory, version);
        mcontext = context;
    }
    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CREATE_WORDS);
        Toast.makeText(mcontext, "Create successed", Toast.LENGTH_SHORT).show();
    }
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
